﻿using System;
using System.Runtime.Serialization;

namespace EvidenceManagement.Model
{
    [DataContract]
    [DbObject(SelectCommandText = "Address_Select"
        , InsertCommandText = "Address_Insert"
        , DeleteCommandText = "Address_Delete"
        , UpdateCommandText = "Address_Update")]
    public class Address : IAuditable
    {
        public Address()
        {
        }

        [DbColumn]
        [DataMember]
        public Guid AddressID
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public string Line1
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public string Line2
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public string Suburb
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public string City
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public string Code
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public Guid ProvinceID
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public decimal Latitude
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public decimal Longitude
        {
            get;
            set;
        }

        #region IAuditable Members

        [DbColumn]
        [DataMember]
        public Guid CreatedBy
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public Guid ModifiedBy
        {
            get;
            set;
        }

        public bool IsDeleted
        {
            get;
            set;
        }

        #endregion

    }
}
